package com.example.backend2.context;

import com.example.backend2.domain.User;

/**
 * 当用户登录成功后，将用户信息放入上下文
 */
public class LoginMemberContext {

    public static ThreadLocal<User> loginMember = new ThreadLocal<>();

    public static void setMember(User user) {
        loginMember.set(user);
    }

    public static User getMember() {
        return loginMember.get();
    }
}
